<!DOCTYPE html>
<html lang="zh-cn">
<head>
{include file="public/header" /}
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong><span class="icon-menu"></span> 域名更新</strong></div>
  <div class="body-content">
    <form class="form-x" action="" id="upurlajax">
      <div class="form-group">
        <div class="label">
          <label>原域名：</label>
        </div>
        <div class="field">
          <input type="text" class="input" name="stitle" id="stitle" value="<?php echo DOM; ?>" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>新域名：</label>
        </div>
        <div class="field">
          <input type="text" class="input" name="domain" id="domain" value="" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-feiji" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
<script type="text/javascript">
$(function(){
  $('#upurlajax').validate({
    submitHandler:function(form){
      var u_domain= $("#stitle").val();//原域名
      var n_domain= $("#domain").val();//新域名
      $.ajax({
        type:"POST",
        url:"{:url('info/urlajax')}",
        data:{
          'title':u_domain,
          'domain':n_domain,
        },
        success:function(data){
          var data=eval("("+data+")");
          if (data.status) {
            parent.layer.msg("更新成功！",{icon:1,time:1000,},function(){parent.location.reload();});
          }

        }
      })
    }
  })
})
   
</script>
</body>
</html>